package com.mmc.delay.bean;


public class JobParam extends AbstractJob {

    public JobParam(String jobId, String topic, String body, int retries, long delayTime) {
        super(jobId, topic, body, retries, delayTime);
    }

    public JobParam(){}

    public static JobParam.JobParamBuilder builder() {
        return new JobParam.JobParamBuilder();
    }

    public static class JobParamBuilder{

        private String jobId;

        private String topic;

        private String body;

        private int retries;

        private long delayTime;

        public JobParamBuilder(){}

        public JobParam.JobParamBuilder jobId(String jobId) {
            this.jobId = jobId;
            return this;
        }

        public JobParam.JobParamBuilder topic(String topic) {
            this.topic = topic;
            return this;
        }

        public JobParam.JobParamBuilder body(String body) {
            this.body = body;
            return this;
        }

        public JobParam.JobParamBuilder retries(int retries) {
            this.retries = retries;
            return this;
        }

        public JobParam.JobParamBuilder delayTime(long delayTime) {
            this.delayTime = delayTime;
            return this;
        }



        public JobParam build() {
            return new JobParam(this.jobId, this.topic, this.body, this.retries, this.delayTime);
        }


    }

    @Override
    public String toString() {
        return "JobParam{" + super.toString()+"}";
    }
}
